1. Field of the Invention
This invention relates in general to database management systems performed by computers, and in particular, to the incremental maintenance of aggregated and join summary tables.
2. Description of Related Art
Computer systems incorporating an Relational DataBase Management System (RDBMS) using a Structured Query Language (SQL) interface are well known in the art. The SQL interface has evolved into a standard language for performing operations in an RDBMS and has been adopted as such by both the American National Standards Institute (ANSI) and the International Standards Organization (ISO).
One application for an RDBMS is a data warehouse. The star schema of a typical data warehouse is comprised of a small number of very large fact tables and some number of relatively small dimension tables. The complex analytical queries that are evaluated in data warehouse environments often join one or more of the fact tables together with some dimension tables to pick up dimension attributes and then aggregate the results of these joins.
A common characteristic of the data warehouse is that data from operational systems are periodically propagated to the warehouse. For example, bulk load append operations may be applied to the fact tables on a nightly basis. Old data may also be periodically purged from the fact tables via delete statements. Dimension tables are typically more static in nature and are updated less often.
The sheer volume of data in the warehouse requires that the number of fact table scans must be minimized. Automatic summary tables, which are also known as “materialized views”, are commonly used in data warehouses to help achieve this goal. Result sets that can be used in the computation of multiple queries are pre-computed and materialized in tables. The queries are then rerouted (either manually by rewriting the query or automatically by sophisticated query compilers) to refer to the summary tables rather than the base fact table data.
However, summary tables must be maintained efficiently to reflect the periodic updates to the data warehouse. Given the vast amount of data involved, there is a need in the art for efficient maintenance methods for summary tables. Moreover, there is a need in the art for maintenance methods that are incremental in nature to avoid full re-computation of the queries that generated the summary tables.